package com.foreknow.oop4;

public class PersonManager {

  public Person[] getAllInfo() {
    Person[] p = new Person[2];
    Person p1 = new Person();
    p1.setName("tom");
    Person p2 = new Person();
    p2.setName("jazz");
    p[0] = p1;
    p[1] = p2;
    return p;
  }

  public Person[] getInfo(Person[] p){ //{p1,p2}
    return p;//{p1,p2}
  }

  public String[] get(String[] ss){
    return ss;
  }

  public double method(double d){
    return d;
  }

  public static void main(String[] args) {
    PersonManager personManager = new PersonManager();
    double ddd = 12.34;
    double ds = personManager.method(ddd);
    System.out.println(ds);

//    String[] array = new String[2];
//    array[0] = "tom";
//    array[1] = "jazz";
//    String[]  abs = personManager.get(array);
//    for(int i = 0;i<abs.length;i++){
//      String s = abs[i];
//      System.out.println(s);
//    }

//    Person[] persons = new Person[2];
//
//    Person p1 = new Person();
//    p1.setName("tom");
//    Person p2 = new Person();
//    p2.setName("jazz");
//
//    persons[0] = p1;
//    persons[1] = p2;
//
//    Person[] ppp = personManager.getInfo(persons);
//    for(int i = 0;i<ppp.length;i++){
//      Person person = ppp[i];
//      System.out.println(person.getName());
//    }

//    Person[] array = personManager.getAllInfo();
//    for(int i = 0;i<array.length;i++){
//      Person person = array[i];
//      System.out.println(person.getName());
//    }
  }
}
